﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DotNet.Common.Command;
using ZLCMS.Commands.User.Commands.ProductSku;
using ZLCMS.Business.DwzFrame;

namespace ZLCMS.Web.SystemManage.Basics.Shop.Product
{
    public partial class ProductDelete : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ZLCMS.Business.DwzFrame.FrameHelper framePage = new ZLCMS.Business.DwzFrame.FrameHelper(this);
            ICommandResult<RemoveProductResult> res = new RemoveProductCommand().Execute(new RemoveProductParameter()
            {
                Ids = Request["ids"],
                Status=Request["status"]
            });
            if (res.Error)
            {
                framePage.Alert(new ReturnCode() { statusCode = 300, message = "操作失败-参数错误!" });
            }
            else
            {
                framePage.Alert(new ZLCMS.Business.DwzFrame.ReturnCode() { statusCode = 200, message = "操作成功!", navTabId = framePage.NavTabId });
            }
        }
    }
}